package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_news")
public class FNews {
    @Id
    private Long tid;

    /**
     * 新闻时间
     */
    private String datetime;

    /**
     * 内容
     */
    private String content;

    /**
     * 标题
     */
    private String title;

    /**
     * 分类
     */
    private String channels;

    public FNews(Long tid, String datetime, String content, String title, String channels) {
        this.tid = tid;
        this.datetime = datetime;
        this.content = content;
        this.title = title;
        this.channels = channels;
    }

    public FNews() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取新闻时间
     *
     * @return datetime - 新闻时间
     */
    public String getDatetime() {
        return datetime;
    }

    /**
     * 设置新闻时间
     *
     * @param datetime 新闻时间
     */
    public void setDatetime(String datetime) {
        this.datetime = datetime;
    }

    /**
     * 获取内容
     *
     * @return content - 内容
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置内容
     *
     * @param content 内容
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取标题
     *
     * @return title - 标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置标题
     *
     * @param title 标题
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 获取分类
     *
     * @return channels - 分类
     */
    public String getChannels() {
        return channels;
    }

    /**
     * 设置分类
     *
     * @param channels 分类
     */
    public void setChannels(String channels) {
        this.channels = channels;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", datetime=").append(datetime);
        sb.append(", content=").append(content);
        sb.append(", title=").append(title);
        sb.append(", channels=").append(channels);
        sb.append("]");
        return sb.toString();
    }
}